<!--
* @description 参数1
* @fileName 02.事件修饰符
* @author userName
* @date 2024-01-22 10:08:13
* @version V1.0.0
!-->
<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>02.事件修饰符</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.14/vue.js"></script>
</head>

<body>
    <div id="app">
        <input type="text" @keyup.enter="handlerClick">
        <br>
        <button @click.enter="handlerSearch">搜索</button>
    </div>

    <script>
        var vm = new Vue({
            data:{
            },
            methods:{
                handlerClick(e) {
                    console.log(e.target.value);
                     // console.log("xxxx");
                    
                },
                handlerSearch() {
                    console.log("我被触发了....");
                }
            }
        });
        vm.$mount("#app")
    </script>
</body>

</html>